﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ArgusPCLib.Threading.Tasks
{
	public delegate void TaskCompletedEventHandler(object sender, TaskCompletedEventArgs e);

	public class TaskCompletedEventArgs : EventArgs
	{
		public int CompletedTasks { get; private set; }
		public int RemainingTasks { get; private set; }
		public int TotalTasks { get { return this.CompletedTasks + RemainingTasks; } }
		public object TaskAsyncState { get; private set; }

		public TaskCompletedEventArgs(int completedTasks, int remainingTasks, object taskAsyncState)
		{
			this.CompletedTasks = completedTasks;
			this.RemainingTasks = remainingTasks;
			this.TaskAsyncState = taskAsyncState;
		}
	}
}
